import { record, diff } from "../dist/index.js";

const key = "test-mark";

record(key); // 0

setTimeout(() => {
  record(key); // 1
}, 1000);

setTimeout(() => {
  record(key); // 2
}, 2000);

setTimeout(() => {
  record(key); // 3
}, 3000);

setTimeout(() => {
  console.log("-- history records --");
  diff(key);
  diff(key, 0, 3);
}, 4000);
